package com.sid.oncf.services.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.sid.oncf.dao.interfaces.IUserDao;
import com.sid.oncf.entity.Users;
import com.sid.oncf.services.interfaces.IUserService;

@Transactional
public class UserServiceImpl implements IUserService {

	@Autowired
	private IUserDao iUserDao;
	
	public boolean saveUser(Users u) {
		// TODO Auto-generated method stub
		return iUserDao.save(u);
	}

	public boolean updateUser(Users u) {
		// TODO Auto-generated method stub
		return iUserDao.update(u);
	}

	public boolean deleteUser(int id) {
		// TODO Auto-generated method stub
		return iUserDao.delete(id);
	}

	public Users findUser(int id) {
		// TODO Auto-generated method stub
		return iUserDao.find(id);
	}

	public List<Users> findAllUsers() {
		// TODO Auto-generated method stub
		return iUserDao.findAll();
	}

}
